#pragma once


class CType;


//reflectable version opetional
//this class instance can force convert to  TOptional<T>
class CReflectableOptional
{
public:
    void* GetValue() const
    {
        return Data;
    }

    bool HasValue() const
    {
        return Data != nullptr;
    }

    void SetValueWithType(CType* InDataType, const void* InValue);
    

    void EraseValueWithType(CType* InDataType);

    void CloneWithType(CType* InDataType, CReflectableOptional* OutMemory) const;


protected:
    void* Data = nullptr;
};